﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data;
namespace yule.IService.Sys
{

    /// <summary>
    /// 测试服务
    /// </summary>
    [ServiceContract]
    public interface IUser
    {
        /// <summary>
        /// 获取用户
        /// </summary>
        /// <param name="id">用户Id</param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        yule.Model.Sys.User GetUser(string id);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        int Delete(string id);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        int Update(yule.Model.Sys.User model);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        int Insert(yule.Model.Sys.User model);

        /// <summary>
        /// 获取所有用户
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(yule.Common.WCF.ServiceException))]
        IList<yule.Model.Sys.User> GetList();

    }


}